package com.example.speeddating.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;

/**
 *
 * @author tina
 * @since 2023-06-28 11:14:33
 */
@Getter
@Setter
public class Follow implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

    /**
     * 是否取关
     */
    @TableLogic
    @JsonIgnore
    private Integer deleted;

    /**
     * 用户关注的
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long followId;

    /**
     * 是否已读
     */
    private Boolean isRead;
}
